/**
 * 
 * 客户分析进入的会议列表
 * 
 * */
import React, { useState, useCallback,useEffect ,useMemo} from 'react';
import Header from '@/component/layout/Header/Header';
import List from './List';
import './style.less';
import qs from "querystring";


const AnalysismettingList = (props) => {
    const { location } = props;

 
  const doctorId = useMemo(() => {
    let search = location.search;
    if (!search) return;
    let str = search.slice(1);
    let param = qs.parse(str);
    return param.doctorId
  }, [location.search])

  const meetingType = useMemo(() => {
    let search = location.search;
    if (!search) return;
    let str = search.slice(1);
    let param = qs.parse(str);
    return param.meetingType
  }, [location.search])


  const [param, setParam] = useState({ pageIndex: 1, pageSize: 20 ,doctorId,meetingType})


  const update = useCallback(() => {
    setParam({ ...param, pageIndex: param.pageIndex + 1 })
  }, [param])

  useEffect(()=>{
    
  })
  return <>
    <Header
      center={<span>会议列表</span>}
    />
    <div className="AnalysismettingList-box global-content">
      <div className="Academic-content">
        <List param={param} update={update} />
      </div>
    </div>
  </>
}


export default React.memo(AnalysismettingList);